<template>
  <div class="search-input">
    <div>
      <input type="text" placeholder="搜索您喜欢的商品" class="search-input" @click="toSearch">
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    // 用户点击了搜索
    toSearch () {
      this.$emit('toSearch');
    }
  }
}
</script>
<style scoped lang="less">
.search-input {
  background-color:#fff;
}
.search-input {
  box-sizing:border-box;
  padding:0px 8px;
  outline: none;
  width:100%;
  height:30px;
}
</style>
